#include<stdio.h>
int main()
{
	int num = 0;
	scanf_s("%d", &num);
	int count = 0;
	int my_best(int);
	count = my_best(num);
	printf("%d", count);
	return 0;
}
int my_best(int num)
{
	int count = 0;
	unsigned int sum = num;
	while (sum)
	{
		if (sum % 2 == 1)
			count++;
		sum = sum >> 1;
	}
	return count;
}